package com.wanxi.single;

import java.util.Scanner;

public class Computer {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入+-*/");
        String fuhao = scanner.next();
        System.out.println("请输入第3个数");
        double a = scanner.nextDouble();
        System.out.println("请输入第2个数");
        double b = scanner.nextDouble();
        switch (fuhao) {
            case "+":
                System.out.println(a + b);
                break;
            case "-":
                System.out.println(a - b);
                break;
            case "*":
                System.out.println(a * b);
                break;
            case "/":
                System.out.println(a / b);
                break;
            default:
                System.out.println("请输入正确的运算符");
                break;
        }
    }
}
